package com.gxa.service.controller;

import com.gxa.common.base.RespResult;
import com.gxa.service.entity.ServiceNode;
import com.gxa.service.service.ServiceNodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/node")
public class ServiceNodeController {

    /**
     * 添加节点
     */
    @Autowired
    private ServiceNodeService service;
    @PostMapping("/addServiceNode")
    public RespResult addServiceNode(@RequestBody List<ServiceNode> serviceNode){
        System.out.println(serviceNode);
        return RespResult.success(service.saveOrUpdateBatch(serviceNode));
    }
}
